<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{volist name='list' id='v' mod='2' offset='3' length='0' empty='空'}
{$mod}--{$key}--id:{$v.id} --name :{$v.name} {eq name='mod' value='1'}<br>{/eq}
{/volist}
<hr>
{foreach name='list' item='v' key='k'}
{$k}--id:{$v.id} --name:{$v.name}<br>
{/foreach}
<hr>
{foreach $list as $k=>$v}
{$k}--id:{$v.id} --name:{$v.name}<br>

{/foreach}

<hr>
{$string|default='默认值'}
<hr>
    {$arr['name']|default='默认值'} --{$arr['age']|default='默认值'}
<hr>
{$arr1[0]['name']|default='默认值'}--{$arr1.0.age|default='默认值'}
<hr>
{$obj->name} --{$obj:sex}
<hr>
{$name} -- {$sex}
</body>
</html>